One: Connection query:Connection query is to connect two or more tables according to a certain condition, select the required data, the connection query query two or more tables at the same time, when there are fields representing the same meaning
In Mysql databases, Mysql Merge tables are somewhat similar to views. Next let's take a look at the advantages of Mysql Merge tables and hope to help you.
Advantages of Mysql Merge table:A: Separate Static and Dynamic DataB: optimize queries using
IntroductionOptimizing SQL is a common task of DBA. How to optimize a statement efficiently and quickly is a common problem for every DBA. In my daily optimization work, I found that many operations are essential in the optimization process. However,
Merge table Note: 1. The structure of each sub-table must be consistent. The structure of the master table and sub-table must be consistent. 2. The index of each sub-table will exist in the merge table, therefore, you cannot perform a unique search
Document directory
1. Merge Tables
1. Merge Tables
If you want to, you can think of the merged table as an old partition table with more restrictions, but they also have their own use, and can provide some functions that the Partition Table
Example 1Two algorithms for using the view merge and temptable are counted separatelyTable Tb_phone in Market_price greater than 4000, and then query the view to find out less than 6000 of the phoneA simple summary of the results obtained: query out
Mysql-merge table bitsCN.com
Mysql-merge table
[SQL]
Note:
1. the structure of each sub-table must be consistent. The structure of the master table and sub-table must be consistent,
2. the index of each sub-table exists in the merge table.
Merge is a very useful function, similar to the insert into on duplicate key in MySQL.
Oracle introduced the merge command in 9i,With this merge, You can execute the inserts and updates operations on a table in an SQL statement at the same time.
In mysql, OrderBy can be used in many usage scenarios. Previously, you can refer to the orderby usage in some manuals. However, this is the first section of this article, next we will introduce the specific usage of this line.
In mysql, Order By can
MySQL Study Notes summary, mysql Study Notes
Slow SQL: A Query whose execution time exceeds the specified time range is called a slow query.In MySQL, how does one record slow SQL statements?A: You can set the following information in my.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.